pkgsrc-WIP-changes archive

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

ti99sim: Fix build, generate plist



Module Name:	pkgsrc-wip
Committed By:	Jason W. Bacon <bacon4000%gmail.com@localhost>
Pushed By:	outpaddling
Date:		Mon Oct 7 16:22:27 2024 -0500
Changeset:	b4bea78f943d27af36c3f636c9b2913112f22f93

Modified Files:
	ti99sim/Makefile
	ti99sim/PLIST
	ti99sim/distinfo
	ti99sim/patches/patch-Makefile.linux
	ti99sim/patches/patch-rules.mak
Added Files:
	ti99sim/patches/patch-src_Makefile
	ti99sim/patches/patch-src_console_Makefile
	ti99sim/patches/patch-src_sdl_Makefile
	ti99sim/patches/patch-src_util_Makefile

Log Message:
ti99sim: Fix build, generate plist

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=b4bea78f943d27af36c3f636c9b2913112f22f93

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

diffstat:
 ti99sim/Makefile                           | 12 ++++--
 ti99sim/PLIST                              | 29 +++++++++++++
 ti99sim/distinfo                           |  8 +++-
 ti99sim/patches/patch-Makefile.linux       | 34 +++++++++++++--
 ti99sim/patches/patch-rules.mak            | 67 +++++++++++++++++++++++++-----
 ti99sim/patches/patch-src_Makefile         | 26 ++++++++++++
 ti99sim/patches/patch-src_console_Makefile | 14 +++++++
 ti99sim/patches/patch-src_sdl_Makefile     | 14 +++++++
 ti99sim/patches/patch-src_util_Makefile    | 54 ++++++++++++++++++++++++
 9 files changed, 239 insertions(+), 19 deletions(-)

diffs:
diff --git a/ti99sim/Makefile b/ti99sim/Makefile
index 0cf3760643..ebc69ef940 100644
--- a/ti99sim/Makefile
+++ b/ti99sim/Makefile
@@ -24,10 +24,14 @@ USE_LANGUAGES=	c c++
 USE_TOOLS+=	gmake
 
 WRKSRC=		${WRKDIR}/ti99sim-${PV}
-# Check this
-MAKE_FLAGS+=	DATA_DIR=${STAGEDIR}${DATADIR} \ \
-		BIN_DIR=${STAGEDIR}${DATADIR}/bin \
-		SYS_BIN=${STAGEDIR}${PREFIX}/bin
+# FIXME: Is it necessary for binaries to exist in DATADIR, or can
+# BIN_DIR be ${PREFIX}/bin?
+MAKE_FLAGS+=	DATA_DIR=${DESTDIR}${DATADIR} \
+		BIN_DIR=${DESTDIR}${DATADIR}/bin \
+		SYS_BIN=${DESTDIR}${PREFIX}/bin \
+		MAKE=${PREFIX}/bin/gmake
+# FIXME: This shouldn't be needed
+LDFLAGS+=	-L${PREFIX}/lib ${COMPILER_RPATH_FLAG}${PREFIX}/lib -lcrypto
 
 PV=		0.16.0
 DATADIR=	${PREFIX}/share/ti99sim
diff --git a/ti99sim/PLIST b/ti99sim/PLIST
index 48d96a5493..90ce5a48d4 100644
--- a/ti99sim/PLIST
+++ b/ti99sim/PLIST
@@ -1 +1,30 @@
 @comment $NetBSD$
+bin/catalog
+bin/convert-ctg
+bin/decode
+bin/disk
+bin/dumpcpu
+bin/dumpgrom
+bin/dumpspch
+bin/list
+bin/mkcart
+bin/mkspch
+bin/say
+bin/ti99sim-console
+bin/ti99sim-sdl
+share/ti99sim/bin/catalog
+share/ti99sim/bin/convert-ctg
+share/ti99sim/bin/decode
+share/ti99sim/bin/disk
+share/ti99sim/bin/dumpcpu
+share/ti99sim/bin/dumpgrom
+share/ti99sim/bin/dumpspch
+share/ti99sim/bin/list
+share/ti99sim/bin/mkcart
+share/ti99sim/bin/mkspch
+share/ti99sim/bin/say
+share/ti99sim/bin/ti99sim-console
+share/ti99sim/bin/ti99sim-sdl
+@pkgdir share/ti99sim/disks
+@pkgdir share/ti99sim/console
+@pkgdir share/ti99sim/cartridges
diff --git a/ti99sim/distinfo b/ti99sim/distinfo
index 1fc7775994..1078511fba 100644
--- a/ti99sim/distinfo
+++ b/ti99sim/distinfo
@@ -3,9 +3,13 @@ $NetBSD$
 BLAKE2s (ti99sim-0.16.0.src.tar.xz) = b6cd23be4a8e281f926a82726409d466651ae03f69fb9a431d1ce44a2d93b09c
 SHA512 (ti99sim-0.16.0.src.tar.xz) = 5636b1ecbaf7da10ecaea2d59aac0d84f03934065c02d3441576e4675a6d818ca21e3af80caddfa9fef640f6e0bef093a09082ec0d453df87b67431d7f5c0fec
 Size (ti99sim-0.16.0.src.tar.xz) = 193760 bytes
-SHA1 (patch-Makefile.linux) = 246b6a6c750bdd1cdc760d9e5e1faa336f913f76
+SHA1 (patch-Makefile.linux) = c45906a6dda3ede7328390e15bbacaaa0f5cde56
 SHA1 (patch-include_common.hpp) = 6a0e63c88eb988b8c8f52ca3bfa435179c206ed4
 SHA1 (patch-include_platform.hpp) = 2b01ea7439d915095a36ea01921c2266fd77094b
-SHA1 (patch-rules.mak) = 2454d30b3440edc679591b961ca879f2855e5819
+SHA1 (patch-rules.mak) = 2c370ccccc7f775d48c453aedb09bab37532ec35
+SHA1 (patch-src_Makefile) = 973ef9f28c277d4be8f67b8e7d55f3e314acc797
+SHA1 (patch-src_console_Makefile) = 79e5b9c710d005facfa7641f2ec129e9f72241b1
 SHA1 (patch-src_core_device-support.cpp) = c685db3bd50d8ee1d320971a3b759e06459c15be
 SHA1 (patch-src_core_stateobject.cpp) = 9ee81d2897741d5d881dd35a83fd622a360ff9ce
+SHA1 (patch-src_sdl_Makefile) = 2cb0bda9c81110f6ee03739ceb5160cb872f34f1
+SHA1 (patch-src_util_Makefile) = e2f64a450229b737f6f70cdf67f43ff8dfeefe07
diff --git a/ti99sim/patches/patch-Makefile.linux b/ti99sim/patches/patch-Makefile.linux
index ad3eed6ad7..c940fe6f0a 100644
--- a/ti99sim/patches/patch-Makefile.linux
+++ b/ti99sim/patches/patch-Makefile.linux
@@ -1,10 +1,38 @@
 $NetBSD$
 
---- Makefile.linux.orig	2024-10-04 12:57:23 UTC
+# Symlinks are problematic with destdir
+
+--- Makefile.linux.orig	2020-05-25 20:52:22.000000000 +0000
 +++ Makefile.linux
-@@ -52,7 +52,7 @@ install: ti99sim
+@@ -1,7 +1,5 @@
+ # TI-99/sim Makefile for Linux
+ 
+-XLIBS += -lstdc++fs
+-
+ ifndef DATA_DIR
+ DATA_DIR  := /opt/ti99sim
+ endif
+@@ -42,17 +40,18 @@ SRC_DIRS = \
+ 	src/util
+ 
+ install: ti99sim
+-	@$(INSTALL) -d $(DATA_DIR)
+-	@$(INSTALL) -d $(DATA_DIR)/cartridges
+-	@$(INSTALL) -d $(DATA_DIR)/console
+-	@$(INSTALL) -d $(DATA_DIR)/disks
+-	@$(INSTALL) -d $(BIN_DIR)
+-	@for target in $(ITARGETS); do \
++	$(INSTALL) -d $(DATA_DIR)
++	$(INSTALL) -d $(DATA_DIR)/cartridges
++	$(INSTALL) -d $(DATA_DIR)/console
++	$(INSTALL) -d $(DATA_DIR)/disks
++	$(INSTALL) -d $(BIN_DIR)
++	$(INSTALL) -d $(SYS_BIN)
++	for target in $(ITARGETS); do \
+ 	   $(INSTALL) -s $$target $(BIN_DIR); \
  	 done
- 	@if [ $(BIN_DIR) != $(SYS_BIN) ]; then \
+-	@if [ $(BIN_DIR) != $(SYS_BIN) ]; then \
++	if [ $(BIN_DIR) != $(SYS_BIN) ]; then \
  	   for target in $(notdir $(ITARGETS)); do \
 -	     ln -f -s $(BIN_DIR)/$$target $(SYS_BIN)/$$target; \
 +	     cp $(BIN_DIR)/$$target $(SYS_BIN)/$$target; \
diff --git a/ti99sim/patches/patch-rules.mak b/ti99sim/patches/patch-rules.mak
index f848f109aa..19502b73a2 100644
--- a/ti99sim/patches/patch-rules.mak
+++ b/ti99sim/patches/patch-rules.mak
@@ -4,7 +4,7 @@ $NetBSD$
 
 --- rules.mak.orig	2020-05-25 20:52:22.000000000 +0000
 +++ rules.mak
-@@ -12,23 +12,22 @@ ifndef CXX
+@@ -12,23 +12,18 @@ ifndef CXX
  CXX      := g++
  endif
  
@@ -18,12 +18,12 @@ $NetBSD$
  CFLAGS   += -funsigned-char
 +CFLAGS   += -Wno-deprecated-declarations
  
- LFLAGS   += -Wl,--gc-sections
- LFLAGS   += -rdynamic
- 
-+ifeq ($(OS),OS_LINUX)
- XLIBS    += -lstdc++fs
-+endif
+-LFLAGS   += -Wl,--gc-sections
+-LFLAGS   += -rdynamic
+-
+-XLIBS    += -lstdc++fs
++LDFLAGS   += -Wl,--gc-sections
++LDFLAGS   += -rdynamic
  
  WARNINGS := -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers
  WARNINGS += -Wno-implicit-fallthrough
@@ -32,7 +32,7 @@ $NetBSD$
  WARNINGS += -Wcast-qual
  
  INCLUDES := -I../../include
-@@ -41,10 +40,6 @@ ifeq ($(CFG),Debug)
+@@ -41,20 +36,16 @@ ifeq ($(CFG),Debug)
  DEBUG    := 1
  endif
  
@@ -42,8 +42,27 @@ $NetBSD$
 -
  ifdef LTO
  CFLAGS   += -flto
- LFLAGS   += -flto
-@@ -80,6 +75,10 @@ ifeq ($(OSTYPE),FreeBSD)
+-LFLAGS   += -flto
++LDFLAGS   += -flto
+ endif
+ 
+ ifdef DEBUG
+ CFLAGS   += -g3 -O0 -DDEBUG
+ else
+ CFLAGS   += -g3 -O3 -fomit-frame-pointer
+-LFLAGS   += -g3 -O3
++LDFLAGS   += -g3 -O3
+ endif
+ 
+ ifdef LOGGER
+@@ -74,12 +65,17 @@ endif
+ 
+ ifeq ($(OSTYPE),Linux)
+ OS       := OS_LINUX
++XLIBS	 += -lstdc++fs
+ endif
+ 
+ ifeq ($(OSTYPE),FreeBSD)
  OS       := OS_LINUX
  endif
  
@@ -54,3 +73,31 @@ $NetBSD$
  ifeq ($(OSTYPE),Darwin)
  CXX      := c++
  OS       := OS_MACOSX
+@@ -102,20 +98,20 @@ CFLAGS   += -D$(OS)
+ DF        = $(CFG)/$(*F)
+ 
+ $(CFG)/%.o : %.cpp
+-	@echo $<
+-	@$(CXX) -c $(CFLAGS) $(WARNINGS) $(INCLUDES) -MD -o $@ $<
+-	@cp $(DF).d $(DF).dep; \
++	echo $<
++	$(CXX) -c $(CFLAGS) $(WARNINGS) $(INCLUDES) -MD -o $@ $<
++	cp $(DF).d $(DF).dep; \
+ 		sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
+ 			-e '/^$$/ d' -e 's/$$/ :/' < $(DF).d >> $(DF).dep; \
+ 		rm -f $(DF).d
+ 
+ $(CFG)/%.o : %.m
+-	@echo $<
+-	@$(CC) -c $(CFLAGS) $(WARNINGS) $(INCLUDES) -o $@ $<
++	echo $<
++	$(CC) -c $(CFLAGS) $(WARNINGS) $(INCLUDES) -o $@ $<
+ 
+ %.h.gch: %.h
+-	@echo Generating pre-compiled header for $<
+-	@$(CXX) $(CFLAGS) $(WARNINGS) $(INCLUDES) $<
++	echo Generating pre-compiled header for $<
++	$(CXX) $(CFLAGS) $(WARNINGS) $(INCLUDES) $<
+ 
+ .SUFFIXES: .cpp .c .o
+ 
diff --git a/ti99sim/patches/patch-src_Makefile b/ti99sim/patches/patch-src_Makefile
new file mode 100644
index 0000000000..7e79f96548
--- /dev/null
+++ b/ti99sim/patches/patch-src_Makefile
@@ -0,0 +1,26 @@
+$NetBSD$
+
+# Respect env $(MAKE)
+
+--- src/Makefile.orig	2020-05-25 20:52:22.000000000 +0000
++++ src/Makefile
+@@ -1,11 +1,11 @@
+ all:
+-	@make -C core
+-	@make -C console
+-	@make -C sdl
+-	@make -C util
++	$(MAKE) -C core
++	$(MAKE) -C console
++	$(MAKE) -C sdl
++	$(MAKE) -C util
+ 
+ clean:
+-	@make -C core clean
+-	@make -C console clean
+-	@make -C sdl clean
+-	@make -C util clean
++	$(MAKE) -C core clean
++	$(MAKE) -C console clean
++	$(MAKE) -C sdl clean
++	$(MAKE) -C util clean
diff --git a/ti99sim/patches/patch-src_console_Makefile b/ti99sim/patches/patch-src_console_Makefile
new file mode 100644
index 0000000000..fbf6365852
--- /dev/null
+++ b/ti99sim/patches/patch-src_console_Makefile
@@ -0,0 +1,14 @@
+$NetBSD$
+
+# Use standard LDFLAGS
+
+--- src/console/Makefile.orig	2020-05-25 20:52:22.000000000 +0000
++++ src/console/Makefile
+@@ -33,6 +33,6 @@ $(BINDIR):
+ 	mkdir -p $@
+ 
+ $(BINDIR)/ti99sim-console: $(OBJS) $(LIBS)
+-	$(CXX) -o $@ $(LFLAGS) $^ $(XLIBS)
++	$(CXX) -o $@ $(LDFLAGS) $^ $(XLIBS)
+ 
+ -include $(FILES:%.cpp=$(CFG)/%.dep)
diff --git a/ti99sim/patches/patch-src_sdl_Makefile b/ti99sim/patches/patch-src_sdl_Makefile
new file mode 100644
index 0000000000..6e3c464470
--- /dev/null
+++ b/ti99sim/patches/patch-src_sdl_Makefile
@@ -0,0 +1,14 @@
+$NetBSD$
+
+# Use standard LDFLAGS
+
+--- src/sdl/Makefile.orig	2020-05-25 20:52:22.000000000 +0000
++++ src/sdl/Makefile
+@@ -43,6 +43,6 @@ $(BINDIR):
+ 	mkdir -p $@
+ 
+ $(TARGET): $(OBJS) $(LIBS)
+-	$(CXX) -o $@ $(LFLAGS) $^ $(XLIBS)
++	$(CXX) -o $@ $(LDFLAGS) $^ $(XLIBS)
+ 
+ -include $(FILES:%.cpp=$(CFG)/%.dep)
diff --git a/ti99sim/patches/patch-src_util_Makefile b/ti99sim/patches/patch-src_util_Makefile
new file mode 100644
index 0000000000..8db3d35c11
--- /dev/null
+++ b/ti99sim/patches/patch-src_util_Makefile
@@ -0,0 +1,54 @@
+$NetBSD$
+
+# Use standard LDFLAGS
+
+--- src/util/Makefile.orig	2020-05-25 20:52:22.000000000 +0000
++++ src/util/Makefile
+@@ -58,36 +58,36 @@ $(BINDIR):
+ 	mkdir -p $@
+ 
+ $(BINDIR)/catalog: $(CFG)/catalog.o $(LIBS)
+-	$(CXX) -o $@ $(LFLAGS) $^ $(XLIBS)
++	$(CXX) -o $@ $(LDFLAGS) $^ $(XLIBS)
+ 
+ $(BINDIR)/convert-ctg: $(CFG)/convert.o $(LIBS)
+-	$(CXX) -o $@ $(LFLAGS) $^ $(XLIBS)
++	$(CXX) -o $@ $(LDFLAGS) $^ $(XLIBS)
+ 
+ $(BINDIR)/decode: $(CFG)/decode.o $(LIBS)
+-	$(CXX) -o $@ $(LFLAGS) $^ $(XLIBS)
++	$(CXX) -o $@ $(LDFLAGS) $^ $(XLIBS)
+ 
+ $(BINDIR)/disk: $(CFG)/disk.o $(LIBS)
+-	$(CXX) -o $@ $(LFLAGS) $^ $(XLIBS)
++	$(CXX) -o $@ $(LDFLAGS) $^ $(XLIBS)
+ 
+ $(BINDIR)/dumpcpu: $(CFG)/dumpcpu.o $(LIBS)
+-	$(CXX) -o $@ $(LFLAGS) $^ $(XLIBS)
++	$(CXX) -o $@ $(LDFLAGS) $^ $(XLIBS)
+ 
+ $(BINDIR)/dumpgrom: $(CFG)/dumpgrom.o gpl.o $(LIBS)
+-	$(CXX) -o $@ $(LFLAGS) $^ $(XLIBS)
++	$(CXX) -o $@ $(LDFLAGS) $^ $(XLIBS)
+ 
+ $(BINDIR)/dumpspch: $(CFG)/dumpspch.o $(LIBS)
+-	$(CXX) -o $@ $(LFLAGS) $^ $(XLIBS)
++	$(CXX) -o $@ $(LDFLAGS) $^ $(XLIBS)
+ 
+ $(BINDIR)/list: $(CFG)/list.o $(LIBS)
+-	$(CXX) -o $@ $(LFLAGS) $^ $(XLIBS)
++	$(CXX) -o $@ $(LDFLAGS) $^ $(XLIBS)
+ 
+ $(BINDIR)/mkcart: $(CFG)/mkcart.o $(LIBS)
+-	$(CXX) -o $@ $(LFLAGS) $^ $(XLIBS)
++	$(CXX) -o $@ $(LDFLAGS) $^ $(XLIBS)
+ 
+ $(BINDIR)/mkspch: $(CFG)/mkspch.o $(LIBS)
+-	$(CXX) -o $@ $(LFLAGS) $^ $(XLIBS)
++	$(CXX) -o $@ $(LDFLAGS) $^ $(XLIBS)
+ 
+ $(BINDIR)/say: $(CFG)/say.o tms9919-sdl.o $(LIBS) $(SDLLIBS)
+-	$(CXX) -o $@ $(LFLAGS) $^ $(XLIBS)
++	$(CXX) -o $@ $(LDFLAGS) $^ $(XLIBS)
+ 
+ -include $(FILES:%.cpp=$(CFG)/%.dep)


Home | Main Index | Thread Index | Old Index