From a6b9a351fb791985814393a83d668d2beccd4721 Mon Sep 17 00:00:00 2001 From: Curtis Mayberry Date: Sun, 11 Sep 2022 22:47:19 -0500 Subject: [PATCH 01/16] inital attempt --- recipes/klayout/build.bat | 2 + recipes/klayout/build.sh | 7 ++++ recipes/klayout/meta.yaml | 81 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 90 insertions(+) create mode 100644 recipes/klayout/build.bat create mode 100644 recipes/klayout/build.sh create mode 100644 recipes/klayout/meta.yaml diff --git a/recipes/klayout/build.bat b/recipes/klayout/build.bat new file mode 100644 index 0000000000000..db6cefefd87c4 --- /dev/null +++ b/recipes/klayout/build.bat @@ -0,0 +1,2 @@ +call %SRC_DIR%\build.bat +cp %SRC_DIR%\bin-release\klayout.exe %prefix%\bin \ No newline at end of file diff --git a/recipes/klayout/build.sh b/recipes/klayout/build.sh new file mode 100644 index 0000000000000..b5aaa37b41974 --- /dev/null +++ b/recipes/klayout/build.sh @@ -0,0 +1,7 @@ +#!/bin/bash +"${SRC_DIR}/build.sh" +echo "bin-release Contents" +echo "--------------------" +ls bin-release +echo "--------------------" +cp bin-release/klayout "${PREFIX}/bin" diff --git a/recipes/klayout/meta.yaml b/recipes/klayout/meta.yaml new file mode 100644 index 0000000000000..2b427fd3973e5 --- /dev/null +++ b/recipes/klayout/meta.yaml @@ -0,0 +1,81 @@ +# Note: there are many handy hints in comments in this example -- remove them when you've finalized your recipe +# If your package is python based, we recommend using Grayskull to generate it instead: +# https://github.com/conda-incubator/grayskull + +# Jinja variables help maintain the recipe as you'll update the version only here. +# Using the name variable with the URL in line 14 is convenient +# when copying and pasting from another recipe, but not really needed. +{% set name = "klayout" %} +{% set version = "0.27.11" %} + +package: + name: {{ name|lower }} + version: {{ version }} + +source: + + url: https://github.com/simplejson/simplejson/releases/download/{{ version }}/klayout-{{ version }}.tar.gz + sha256: 2b3a0c466fb4a1014ea131c2b8ea7c519f9278eba73d6fcb361b7bdb4fd494e9 + # sha256 is the preferred checksum -- you can get it for a file with: + # `openssl sha256 `. + # You may need the openssl package, available on conda-forge: + # `conda install openssl -c conda-forge`` + +build: + # Uncomment the following line if the package is pure Python and the recipe is exactly the same for all platforms. + # It is okay if the dependencies are not built for all platforms/versions, although selectors are still not allowed. + # See https://conda-forge.org/docs/maintainer/knowledge_base.html#noarch-python for more details. + # noarch: python + # If the installation is complex, or different between Unix and Windows, use separate bld.bat and build.sh files instead of this key. + # By default, the package will be built for the Python versions supported by conda-forge and for all major OSs. + # Add the line "skip: True # [py<35]" (for example) to limit to Python 3.5 and newer, or "skip: True # [not win]" to limit to Windows. + # More info about selectors can be found in the conda-build docs: + # https://docs.conda.io/projects/conda-build/en/latest/resources/define-metadata.html#preprocessing-selectors + number: 0 + +requirements: + build: + # If your project compiles code (such as a C extension) then add the required compilers as separate entries here. + # Compilers are named 'c', 'cxx' and 'fortran'. + - {{ compiler('cxx') }} + + host: + # All Platforms + - python>3 + - pip + - ruby>2 + - Qt>=5 + - make + - zlib + # Windows + - expat # [not win] + - curl + - pthreads-win32 + +test: + # For python packages, it is useful to run pip check. However, sometimes the + # metadata used by pip is out of date. Thus this section is optional if it is + # failing. + commands: + - pip check + +about: + home: https://www.klayout.de/ + summary: 'Your Mask Layout Friend' + description: | + - View: Fast and accurate viewing of huge layout files + - Edit: Draw, modify and transform hierarchical layout + - Generate: Script layout generators, PCells and layout transformation tools + - Analyze: Search, verify, and measure layout and code analysis scripts + license: GPL-2.0-or-later + license_family: GPL + license_file: LICENSE + doc_url: https://www.klayout.de/doc.html + dev_url: https://github.com/KLayout/klayout + +extra: + recipe-maintainers: + # GitHub IDs for maintainers of the recipe. + # Always check with the people listed below if they are OK becoming maintainers of the recipe. (There will be spam!) + - curtisma + - klayoutmatthias From 892a7caab00cbb859d86523e466c5f562afe3e6b Mon Sep 17 00:00:00 2001 From: Curtis Mayberry Date: Mon, 12 Sep 2022 14:43:09 -0500 Subject: [PATCH 02/16] fix issues preventing the build and lint --- recipes/klayout/meta.yaml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/recipes/klayout/meta.yaml b/recipes/klayout/meta.yaml index 2b427fd3973e5..91358634ad320 100644 --- a/recipes/klayout/meta.yaml +++ b/recipes/klayout/meta.yaml @@ -40,24 +40,24 @@ requirements: - {{ compiler('cxx') }} host: - # All Platforms + # All Platforms - python>3 - pip - ruby>2 - Qt>=5 - make - zlib - # Windows - - expat # [not win] - - curl - - pthreads-win32 + # Windows + - expat # [win] + - curl # [win] + - pthreads-win32 # [win] test: # For python packages, it is useful to run pip check. However, sometimes the # metadata used by pip is out of date. Thus this section is optional if it is # failing. commands: - - pip check + - klayout -v about: home: https://www.klayout.de/ @@ -79,3 +79,4 @@ extra: # Always check with the people listed below if they are OK becoming maintainers of the recipe. (There will be spam!) - curtisma - klayoutmatthias + - proppy From bacf13c144ba15059e587983e79b2cb33723ea0b Mon Sep 17 00:00:00 2001 From: Curtis Mayberry Date: Mon, 12 Sep 2022 14:46:49 -0500 Subject: [PATCH 03/16] update sha256 hash --- recipes/klayout/meta.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/recipes/klayout/meta.yaml b/recipes/klayout/meta.yaml index 91358634ad320..491b751016bad 100644 --- a/recipes/klayout/meta.yaml +++ b/recipes/klayout/meta.yaml @@ -13,9 +13,8 @@ package: version: {{ version }} source: - url: https://github.com/simplejson/simplejson/releases/download/{{ version }}/klayout-{{ version }}.tar.gz - sha256: 2b3a0c466fb4a1014ea131c2b8ea7c519f9278eba73d6fcb361b7bdb4fd494e9 + sha256: cc14c4840504c6b623548c0af1600c933791b2c76d012bda3468a3610b3ae15a # sha256 is the preferred checksum -- you can get it for a file with: # `openssl sha256 `. # You may need the openssl package, available on conda-forge: From 97cbb40ad644766fa759a12d137f4773889c1c0c Mon Sep 17 00:00:00 2001 From: Curtis Mayberry Date: Tue, 13 Sep 2022 08:18:03 -0500 Subject: [PATCH 04/16] fix source url --- recipes/klayout/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/klayout/meta.yaml b/recipes/klayout/meta.yaml index 491b751016bad..09920560eab25 100644 --- a/recipes/klayout/meta.yaml +++ b/recipes/klayout/meta.yaml @@ -13,7 +13,7 @@ package: version: {{ version }} source: - url: https://github.com/simplejson/simplejson/releases/download/{{ version }}/klayout-{{ version }}.tar.gz + url: https://github.com/KLayout/klayout/releases/download/{{ version }}/klayout-{{ version }}.tar.gz sha256: cc14c4840504c6b623548c0af1600c933791b2c76d012bda3468a3610b3ae15a # sha256 is the preferred checksum -- you can get it for a file with: # `openssl sha256 `. From 39520bc5a2c9561c634a7fc1366f76504dacb021 Mon Sep 17 00:00:00 2001 From: Curtis Mayberry Date: Sun, 25 Sep 2022 01:10:44 -0500 Subject: [PATCH 05/16] fix url --- recipes/klayout/meta.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/recipes/klayout/meta.yaml b/recipes/klayout/meta.yaml index 09920560eab25..46ee0ccc82b64 100644 --- a/recipes/klayout/meta.yaml +++ b/recipes/klayout/meta.yaml @@ -13,7 +13,8 @@ package: version: {{ version }} source: - url: https://github.com/KLayout/klayout/releases/download/{{ version }}/klayout-{{ version }}.tar.gz + #url: https://github.com/KLayout/klayout/releases/download/{{ version }}/klayout-{{ version }}.tar.gz + url: https://github.com/KLayout/klayout/archive/refs/tags/v{{ version }}.tar.gz sha256: cc14c4840504c6b623548c0af1600c933791b2c76d012bda3468a3610b3ae15a # sha256 is the preferred checksum -- you can get it for a file with: # `openssl sha256 `. From fa8027e740163d2328abfd44071162e8844f2ffa Mon Sep 17 00:00:00 2001 From: Curtis Mayberry Date: Sun, 25 Sep 2022 17:38:11 -0500 Subject: [PATCH 06/16] fix python issue --- recipes/klayout/build.sh | 2 +- recipes/klayout/meta.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/klayout/build.sh b/recipes/klayout/build.sh index b5aaa37b41974..4420a9bbfe76d 100644 --- a/recipes/klayout/build.sh +++ b/recipes/klayout/build.sh @@ -1,5 +1,5 @@ #!/bin/bash -"${SRC_DIR}/build.sh" +"${SRC_DIR}"/build.sh -python ${PYTHON} echo "bin-release Contents" echo "--------------------" ls bin-release diff --git a/recipes/klayout/meta.yaml b/recipes/klayout/meta.yaml index 46ee0ccc82b64..5ac316b6c37c3 100644 --- a/recipes/klayout/meta.yaml +++ b/recipes/klayout/meta.yaml @@ -41,7 +41,7 @@ requirements: host: # All Platforms - - python>3 + - python>3.6 - pip - ruby>2 - Qt>=5 From 80d86b77f5877434257e37ad3b196779ec7b4948 Mon Sep 17 00:00:00 2001 From: "curtis.mayberry" Date: Mon, 26 Sep 2022 08:23:35 -0700 Subject: [PATCH 07/16] add libpython-static to host requirements --- recipes/klayout/meta.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/klayout/meta.yaml b/recipes/klayout/meta.yaml index 5ac316b6c37c3..4a2cf3b5758bf 100644 --- a/recipes/klayout/meta.yaml +++ b/recipes/klayout/meta.yaml @@ -47,6 +47,7 @@ requirements: - Qt>=5 - make - zlib + - libpython-static # Windows - expat # [win] - curl # [win] From 5953d79abdf58c3a68f4a2e4a977ebacf0c8fd00 Mon Sep 17 00:00:00 2001 From: "curtis.mayberry" Date: Mon, 26 Sep 2022 11:05:58 -0700 Subject: [PATCH 08/16] Add maintainers --- recipes/klayout/meta.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipes/klayout/meta.yaml b/recipes/klayout/meta.yaml index 4a2cf3b5758bf..d468fc6010a82 100644 --- a/recipes/klayout/meta.yaml +++ b/recipes/klayout/meta.yaml @@ -81,3 +81,5 @@ extra: - curtisma - klayoutmatthias - proppy + - flaport + - joamatab From 5b08369f73ff7cfd4886890f60ec8b22e492375a Mon Sep 17 00:00:00 2001 From: Curtis Mayberry Date: Sat, 12 Nov 2022 16:54:27 -0600 Subject: [PATCH 09/16] fix windows --- recipes/klayout/build.bat | 2 +- recipes/klayout/build.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/klayout/build.bat b/recipes/klayout/build.bat index db6cefefd87c4..7d8072a39a0e9 100644 --- a/recipes/klayout/build.bat +++ b/recipes/klayout/build.bat @@ -1,2 +1,2 @@ call %SRC_DIR%\build.bat -cp %SRC_DIR%\bin-release\klayout.exe %prefix%\bin \ No newline at end of file +cp %SRC_DIR%\bin-release\klayout.exe %prefix%\bin diff --git a/recipes/klayout/build.sh b/recipes/klayout/build.sh index 4420a9bbfe76d..bd87f66a07214 100644 --- a/recipes/klayout/build.sh +++ b/recipes/klayout/build.sh @@ -4,4 +4,4 @@ echo "bin-release Contents" echo "--------------------" ls bin-release echo "--------------------" -cp bin-release/klayout "${PREFIX}/bin" +cp bin-release/klayout "${PREFIX}/bin" -pylib "" From ae56c2ddc5fdecedeaf2bc1e0b542e23290409d7 Mon Sep 17 00:00:00 2001 From: Curtis Mayberry Date: Sat, 12 Nov 2022 18:19:50 -0600 Subject: [PATCH 10/16] add linux debug flag --- recipes/klayout/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/klayout/build.sh b/recipes/klayout/build.sh index bd87f66a07214..6178943d6a1ed 100644 --- a/recipes/klayout/build.sh +++ b/recipes/klayout/build.sh @@ -1,5 +1,5 @@ #!/bin/bash -"${SRC_DIR}"/build.sh -python ${PYTHON} +"${SRC_DIR}"/build.sh -debug -python ${PYTHON} echo "bin-release Contents" echo "--------------------" ls bin-release From ca789cbda3f55854b5c6188ff0da30b85f1b200d Mon Sep 17 00:00:00 2001 From: Curtis Mayberry Date: Sat, 12 Nov 2022 18:20:02 -0600 Subject: [PATCH 11/16] add make to build req --- recipes/klayout/meta.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/recipes/klayout/meta.yaml b/recipes/klayout/meta.yaml index d468fc6010a82..47989456abbab 100644 --- a/recipes/klayout/meta.yaml +++ b/recipes/klayout/meta.yaml @@ -6,7 +6,7 @@ # Using the name variable with the URL in line 14 is convenient # when copying and pasting from another recipe, but not really needed. {% set name = "klayout" %} -{% set version = "0.27.11" %} +{% set version = "0.27.12" %} package: name: {{ name|lower }} @@ -38,6 +38,7 @@ requirements: # If your project compiles code (such as a C extension) then add the required compilers as separate entries here. # Compilers are named 'c', 'cxx' and 'fortran'. - {{ compiler('cxx') }} + - make host: # All Platforms From 31b81b25a366be9ab6942fc767d9e6cd8c6a11ba Mon Sep 17 00:00:00 2001 From: Curtis Mayberry Date: Sat, 12 Nov 2022 18:28:33 -0600 Subject: [PATCH 12/16] fix sha256 hash --- recipes/klayout/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/klayout/meta.yaml b/recipes/klayout/meta.yaml index 47989456abbab..35e8b030ea8c5 100644 --- a/recipes/klayout/meta.yaml +++ b/recipes/klayout/meta.yaml @@ -15,7 +15,7 @@ package: source: #url: https://github.com/KLayout/klayout/releases/download/{{ version }}/klayout-{{ version }}.tar.gz url: https://github.com/KLayout/klayout/archive/refs/tags/v{{ version }}.tar.gz - sha256: cc14c4840504c6b623548c0af1600c933791b2c76d012bda3468a3610b3ae15a + sha256: 6ef5e6ae5ea387618663949a1efa105406aeb36db2d18d89eff0345955aae979 # sha256 is the preferred checksum -- you can get it for a file with: # `openssl sha256 `. # You may need the openssl package, available on conda-forge: From eedef1ec876ca376eb93eb751fd639e6ecedcff9 Mon Sep 17 00:00:00 2001 From: Curtis Mayberry Date: Sat, 12 Nov 2022 21:20:19 -0600 Subject: [PATCH 13/16] Update package name --- recipes/{klayout => klayout-gui}/build.bat | 0 recipes/klayout-gui/build.sh | 5 +++++ recipes/{klayout => klayout-gui}/meta.yaml | 2 +- recipes/klayout/build.sh | 7 ------- 4 files changed, 6 insertions(+), 8 deletions(-) rename recipes/{klayout => klayout-gui}/build.bat (100%) create mode 100644 recipes/klayout-gui/build.sh rename recipes/{klayout => klayout-gui}/meta.yaml (99%) delete mode 100644 recipes/klayout/build.sh diff --git a/recipes/klayout/build.bat b/recipes/klayout-gui/build.bat similarity index 100% rename from recipes/klayout/build.bat rename to recipes/klayout-gui/build.bat diff --git a/recipes/klayout-gui/build.sh b/recipes/klayout-gui/build.sh new file mode 100644 index 0000000000000..5b41bdb8f2460 --- /dev/null +++ b/recipes/klayout-gui/build.sh @@ -0,0 +1,5 @@ +#!/bin/bash +"${SRC_DIR}"/build.sh -python ${PYTHON} -bin "${PREFIX}/bin" +echo "bin Contents" +echo "--------------------" +ls "${PREFIX}/bin" diff --git a/recipes/klayout/meta.yaml b/recipes/klayout-gui/meta.yaml similarity index 99% rename from recipes/klayout/meta.yaml rename to recipes/klayout-gui/meta.yaml index 35e8b030ea8c5..8f2ce772f7b39 100644 --- a/recipes/klayout/meta.yaml +++ b/recipes/klayout-gui/meta.yaml @@ -9,7 +9,7 @@ {% set version = "0.27.12" %} package: - name: {{ name|lower }} + name: {{ name|lower }}-gui version: {{ version }} source: diff --git a/recipes/klayout/build.sh b/recipes/klayout/build.sh deleted file mode 100644 index 6178943d6a1ed..0000000000000 --- a/recipes/klayout/build.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash -"${SRC_DIR}"/build.sh -debug -python ${PYTHON} -echo "bin-release Contents" -echo "--------------------" -ls bin-release -echo "--------------------" -cp bin-release/klayout "${PREFIX}/bin" -pylib "" From f80d310b865b6ebee5f707a496a05fe829ca8e7d Mon Sep 17 00:00:00 2001 From: Curtis Mayberry Date: Sat, 12 Nov 2022 23:49:04 -0600 Subject: [PATCH 14/16] renname back to klayout and try to fix lint error --- recipes/{klayout-gui => klayout}/build.bat | 0 recipes/{klayout-gui => klayout}/build.sh | 0 recipes/{klayout-gui => klayout}/meta.yaml | 2 +- 3 files changed, 1 insertion(+), 1 deletion(-) rename recipes/{klayout-gui => klayout}/build.bat (100%) rename recipes/{klayout-gui => klayout}/build.sh (100%) rename recipes/{klayout-gui => klayout}/meta.yaml (99%) diff --git a/recipes/klayout-gui/build.bat b/recipes/klayout/build.bat similarity index 100% rename from recipes/klayout-gui/build.bat rename to recipes/klayout/build.bat diff --git a/recipes/klayout-gui/build.sh b/recipes/klayout/build.sh similarity index 100% rename from recipes/klayout-gui/build.sh rename to recipes/klayout/build.sh diff --git a/recipes/klayout-gui/meta.yaml b/recipes/klayout/meta.yaml similarity index 99% rename from recipes/klayout-gui/meta.yaml rename to recipes/klayout/meta.yaml index 8f2ce772f7b39..35e8b030ea8c5 100644 --- a/recipes/klayout-gui/meta.yaml +++ b/recipes/klayout/meta.yaml @@ -9,7 +9,7 @@ {% set version = "0.27.12" %} package: - name: {{ name|lower }}-gui + name: {{ name|lower }} version: {{ version }} source: From 624cd4f9682331ba84f164a2398417a5c366f1bf Mon Sep 17 00:00:00 2001 From: Curtis Mayberry Date: Sun, 13 Nov 2022 22:55:48 -0600 Subject: [PATCH 15/16] add g++ patch --- recipes/klayout/build.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/recipes/klayout/build.sh b/recipes/klayout/build.sh index 5b41bdb8f2460..4ed1997a0f3a4 100644 --- a/recipes/klayout/build.sh +++ b/recipes/klayout/build.sh @@ -1,5 +1,15 @@ #!/bin/bash -"${SRC_DIR}"/build.sh -python ${PYTHON} -bin "${PREFIX}/bin" + +# even though we specify QMAKE_CXX in -expert mode, qmake still +# needs "g++" while obtaining gcc paths (while bootstrapping?) +# So we create a temporary link called "g++" +mkdir tmp_exe +cd tmp_exe +ln -s $GXX g++ +cd .. +export PATH=$(pwd)/tmp_exe:$PATH + +"${SRC_DIR}"/build.sh -python ${PYTHON} -bin "${PREFIX}/bin" -expert echo "bin Contents" echo "--------------------" ls "${PREFIX}/bin" From cd8004b25aa4a8e7ec8de3de3bbf93ae7a73dc1d Mon Sep 17 00:00:00 2001 From: Curtis Mayberry Date: Sun, 13 Nov 2022 22:56:17 -0600 Subject: [PATCH 16/16] add mesa-libgl build req --- recipes/klayout/meta.yaml | 1 + recipes/klayout/yum_requirements.txt | 1 + 2 files changed, 2 insertions(+) create mode 100644 recipes/klayout/yum_requirements.txt diff --git a/recipes/klayout/meta.yaml b/recipes/klayout/meta.yaml index 35e8b030ea8c5..a576df7aa1c17 100644 --- a/recipes/klayout/meta.yaml +++ b/recipes/klayout/meta.yaml @@ -39,6 +39,7 @@ requirements: # Compilers are named 'c', 'cxx' and 'fortran'. - {{ compiler('cxx') }} - make + - {{ cdt('mesa-libgl-devel') }} # [linux] host: # All Platforms diff --git a/recipes/klayout/yum_requirements.txt b/recipes/klayout/yum_requirements.txt new file mode 100644 index 0000000000000..0e16b14e7a64e --- /dev/null +++ b/recipes/klayout/yum_requirements.txt @@ -0,0 +1 @@ +mesa-libGL