From 369abde001a6e0860ff305314bba346ea1ebb6d8 Mon Sep 17 00:00:00 2001
From: Johan Euphrosine <proppy@google.com>
Date: Fri, 2 Jun 2023 15:22:04 +0900
Subject: [PATCH] misc/open_pdks/gf180mcuc: fix klayout lvs path

---
 misc/open_pdks/gf180mcuc/fix-klayout-lvs-path.patch | 13 +++++++++++++
 misc/open_pdks/gf180mcuc/meta.yaml                  |  1 +
 2 files changed, 14 insertions(+)
 create mode 100644 misc/open_pdks/gf180mcuc/fix-klayout-lvs-path.patch

diff --git a/misc/open_pdks/gf180mcuc/fix-klayout-lvs-path.patch b/misc/open_pdks/gf180mcuc/fix-klayout-lvs-path.patch
new file mode 100644
index 00000000..3130ae0d
--- /dev/null
+++ b/misc/open_pdks/gf180mcuc/fix-klayout-lvs-path.patch
@@ -0,0 +1,13 @@
+diff --git a/gf180mcu/Makefile.in b/gf180mcu/Makefile.in
+index 5a71821..2842a03 100644
+--- a/gf180mcu/Makefile.in
++++ b/gf180mcu/Makefile.in
+@@ -718,7 +718,7 @@ klayout-%: ${GF180MCU_PV_PATH} ${GF180MCU_PR_PATH}
+ 
+ 	cp -rp ${GF180MCU_PV_PATH}/klayout/drc/* \
+ 		${KLAYOUT_STAGING_$*}/drc
+-	cp -rp ${GF180MCU_PR_PATH}/rules/klayout/lvs/* \
++	cp -rp ${GF180MCU_PV_PATH}/klayout/lvs/* \
+ 		${KLAYOUT_STAGING_$*}/lvs
+ 	cp -rp ${GF180MCU_PR_PATH}/cells/klayout/pymacros/cells/* \
+ 		${KLAYOUT_STAGING_$*}/pymacros
diff --git a/misc/open_pdks/gf180mcuc/meta.yaml b/misc/open_pdks/gf180mcuc/meta.yaml
index 63d4b0f9..f12eabe9 100644
--- a/misc/open_pdks/gf180mcuc/meta.yaml
+++ b/misc/open_pdks/gf180mcuc/meta.yaml
@@ -11,6 +11,7 @@ source:
     patches:
       - use-sources-from-conda.patch
       - disable-link-targets-for-C-variant.patch
+      - fix-klayout-lvs-path.patch
   - git_url: https://github.com/efabless/globalfoundries-pdk-libs-gf180mcu_fd_pr.git
     git_rev: main
     git_depth: 1