fix: Add patch to resolve issues around installation of scmos files

This commit is contained in:
Torleif Skår 2025-07-24 15:04:04 +02:00
parent 72a994fb73
commit cd8b26c077
3 changed files with 75 additions and 3 deletions

View file

@ -1,7 +1,7 @@
pkgbase = magic
pkgdesc = A VLSI layout system
pkgver = 8.3.530
pkgrel = 1
pkgrel = 2
url = http://opencircuitdesign.com/magic/
arch = i686
arch = x86_64
@ -25,7 +25,9 @@ pkgbase = magic
options = !lto
source = magic-8.3.530::git+https://github.com/RTimothyEdwards/magic#tag=8.3.530
source = 0001-set_std_gnu17_default.patch
source = 0002-makefile-ensure-objs-folder.patch
b2sums = 624acd576fbe8928e5a58ca1198d2e939a5f4d572d42c6c8d3ba69aaf1f85c251693dbf56f3f8078d03e37c89b783cef5f5262eb29ed08e3b84a950e339952ba
b2sums = 37eaa5bbaab691216ffc06485e6d5d934c74f63e74a876da5bedb0f9fd98f404abfbaa902b9fa979e276e38ba660b4049fbe3d6ff43b591e1d1d3fb2d128eb51
b2sums = d4f1518e6366c65201df29c50d03862744a8218d192ca510cca8954385f25e51d87a985bfa468347104db2ec767ba84bd58aaa25def2d230ea757e3b36ca600a
pkgname = magic

View file

@ -0,0 +1,63 @@
From a0c25b8f4627f0331108b3452273859b71bbc9f6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Torleif=20Sk=C3=A5r?= <torleif.skaar@gmail.com>
Date: Thu, 24 Jul 2025 14:58:01 +0200
Subject: [PATCH] makefile: Ensure that 'OBJS_DIR' exist for all dependencies
It looks like there is some racy-ness here causing
issues with the copying of files to the objs dir,
causing the scmos techfiles to not get copied
---
scmos/cif_template/Makefile | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/scmos/cif_template/Makefile b/scmos/cif_template/Makefile
index 89377a82..c068f27c 100644
--- a/scmos/cif_template/Makefile
+++ b/scmos/cif_template/Makefile
@@ -32,35 +32,35 @@ $(OBJS_DIR):
$(MKDIR) $(OBJS_DIR)
$(CIFIN): cifin.c cifin-cmos26b.gen cifin.gen cifin.nw cifin.oldnw\
- cifin.others cifin.pw cifin-ami16.gen
+ cifin.others cifin.pw cifin-ami16.gen | $(OBJS_DIR)
rm -f $(CIFIN)
$(SC_CPP) -DSTANDARD cifin.c | ${SED_CMD} > $(CIFIN)
$(CIFOUT): cifout.c cifout-cmos26b.gen cifout.gen cifout.nw\
- cifout.others cifout.pw cifout-ami16.gen
+ cifout.others cifout.pw cifout-ami16.gen | $(OBJS_DIR)
rm -f $(CIFOUT)
$(SC_CPP) -DSTANDARD cifout.c | ${SED_CMD} > $(CIFOUT)
-$(IBMCIFIN): cifin.c cifin-ibm.gen
+$(IBMCIFIN): cifin.c cifin-ibm.gen | $(OBJS_DIR)
rm -f $(IBMCIFIN)
$(SC_CPP) -DIBM cifin.c | ${SED_CMD} > $(IBMCIFIN)
-$(IBMCIFOUT): cifout.c cifout-ibm.gen
+$(IBMCIFOUT): cifout.c cifout-ibm.gen | $(OBJS_DIR)
rm -f $(IBMCIFOUT)
$(SC_CPP) -DIBM cifout.c | ${SED_CMD} > $(IBMCIFOUT)
-$(TMCIFIN): cifin.c cifin-cmos26b.gen
+$(TMCIFIN): cifin.c cifin-cmos26b.gen | $(OBJS_DIR)
rm -f $(TMCIFIN)
$(SC_CPP) -DTIGHTMETAL cifin.c | ${SED_CMD} > $(TMCIFIN)
-$(TMCIFOUT): cifout.c cifout-cmos26b.gen
+$(TMCIFOUT): cifout.c cifout-cmos26b.gen | $(OBJS_DIR)
rm -f $(TMCIFOUT)
$(SC_CPP) -DTIGHTMETAL cifout.c | ${SED_CMD} > $(TMCIFOUT)
-$(SUBCIFIN): cifin.c cifin-cmos26g.gen cifin-cmos14b.gen
+$(SUBCIFIN): cifin.c cifin-cmos26g.gen cifin-cmos14b.gen | $(OBJS_DIR)
rm -f $(SUBCIFIN)
$(SC_CPP) -DSUBMICRON cifin.c | ${SED_CMD} > $(SUBCIFIN)
-$(SUBCIFOUT): cifout.c cifout-cmos26g.gen cifout-cmos14b.gen
+$(SUBCIFOUT): cifout.c cifout-cmos26g.gen cifout-cmos14b.gen | $(OBJS_DIR)
rm -f $(SUBCIFOUT)
$(SC_CPP) -DSUBMICRON cifout.c | ${SED_CMD} > $(SUBCIFOUT)
--
2.50.1

View file

@ -3,7 +3,7 @@
# Contributor: Jared Casper <jaredcasper@gmail.com>
pkgname=magic
pkgver=8.3.530
pkgrel=1
pkgrel=2
pkgdesc="A VLSI layout system"
_git_url="https://github.com/RTimothyEdwards/magic"
url="http://opencircuitdesign.com/magic/"
@ -36,10 +36,12 @@ _archive="${pkgname}-${pkgver}"
source=(
"${_archive}::git+${_git_url}#tag=${pkgver}"
"0001-set_std_gnu17_default.patch"
"0002-makefile-ensure-objs-folder.patch"
)
b2sums=('624acd576fbe8928e5a58ca1198d2e939a5f4d572d42c6c8d3ba69aaf1f85c251693dbf56f3f8078d03e37c89b783cef5f5262eb29ed08e3b84a950e339952ba'
'37eaa5bbaab691216ffc06485e6d5d934c74f63e74a876da5bedb0f9fd98f404abfbaa902b9fa979e276e38ba660b4049fbe3d6ff43b591e1d1d3fb2d128eb51')
'37eaa5bbaab691216ffc06485e6d5d934c74f63e74a876da5bedb0f9fd98f404abfbaa902b9fa979e276e38ba660b4049fbe3d6ff43b591e1d1d3fb2d128eb51'
'd4f1518e6366c65201df29c50d03862744a8218d192ca510cca8954385f25e51d87a985bfa468347104db2ec767ba84bd58aaa25def2d230ea757e3b36ca600a')
options=(!ccache !lto)
@ -50,6 +52,11 @@ prepare() {
# See upstream issue: https://github.com/RTimothyEdwards/magic/issues/401
# for more details about why we need to use C17 + GNU extensions
patch -Np1 < "../0001-set_std_gnu17_default.patch"
# SCMOS techfiles doesn't get copied due to racyness of the makefile
# TODO: report upstream
patch -Np1 < "../0002-makefile-ensure-objs-folder.patch"
}
build() {