-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #268 from proppy/klayout
misc: add klayout
- Loading branch information
Showing
4 changed files
with
167 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
set -x | ||
|
||
# Identify OS | ||
UNAME_OUT="$(uname -s)" | ||
case "${UNAME_OUT}" in | ||
Linux*) OS=Linux;; | ||
*) OS="${UNAME_OUT}" | ||
echo "Unknown OS: ${OS}" | ||
exit;; | ||
esac | ||
|
||
cd ${SRC_DIR} | ||
./build.sh -build "${SRC_DIR}/build" -python "${PYTHON}" -expert -without-qtbinding -libpng -libexpat -dry-run | ||
|
||
cd ${SRC_DIR}/build | ||
make V=1 -j$CPU_COUNT | ||
make V=1 install | ||
|
||
cd ${SRC_DIR}/bin-release | ||
cp -a klayout strm* ${PREFIX}/bin/ | ||
cp -a *.so* ${PREFIX}/lib/ | ||
mkdir -p ${PREFIX}/lib/klayout/ | ||
cp -ar pymod *_plugins ${PREFIX}/lib/klayout/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
diff --git a/build.sh b/build.sh | ||
index e49c132e5..a035474bc 100755 | ||
--- a/build.sh | ||
+++ b/build.sh | ||
@@ -412,35 +412,8 @@ if [ "$PYTHON" != "" ] && [ "$PYTHON" != "-" ]; then | ||
|
||
# Get Python installation files | ||
if [ "$PYTHONLIBFILE" = "" ]; then | ||
- PYTHONLIBFILENAME=`$PYTHON -c "import sysconfig; print(sysconfig.get_config_vars('LDLIBRARY')[0])" 2>/dev/null` | ||
- if [ "$PYTHONLIBFILENAME" = "" ]; then | ||
- PYTHONLIBFILENAME=`$PYTHON -c "import sysconfig; print(sysconfig.get_config_vars('LIBRARY')[0])" 2>/dev/null` | ||
- fi | ||
- if [ "$PYTHONLIBFILENAME" = "" ]; then | ||
- PYTHONLIBFILENAME=`$PYTHON -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_vars('LDLIBRARY')[0])" 2>/dev/null` | ||
- fi | ||
- if [ "$PYTHONLIBFILENAME" = "" ]; then | ||
- PYTHONLIBFILENAME=`$PYTHON -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_vars('LIBRARY')[0])" 2>/dev/null` | ||
- fi | ||
- if [ "$PYTHONLIBFILENAME" = "" ]; then | ||
- echo "*** WARNING: Could not get Python library name" | ||
- else | ||
- PYTHONLIBFILEPATH=`$PYTHON -c "import sysconfig; print(sysconfig.get_config_vars('LIBDIR')[0])" 2>/dev/null` | ||
- if [ "$PYTHONLIBFILEPATH" = "" ]; then | ||
- PYTHONLIBFILEPATH=`$PYTHON -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_vars('LIBDIR')[0])" 2>/dev/null` | ||
- fi | ||
- if [ "$PYTHONLIBFILEPATH" = "" ]; then | ||
- echo "*** WARNING: Could not get Python library path" | ||
- else | ||
- PYTHONLIBFILE="$PYTHONLIBFILEPATH/$PYTHONLIBFILENAME" | ||
- if [ ! -f "$PYTHONLIBFILE" ]; then | ||
- echo " INFO: Python library not in default path, trying to use MULTIARCH" | ||
- PYTHONMULTIARCH=`$PYTHON -c "import sysconfig; print(sysconfig.get_config_vars('MULTIARCH')[0])" 2>/dev/null` | ||
- PYTHONLIBFILE="$PYTHONLIBFILEPATH/$PYTHONMULTIARCH/$PYTHONLIBFILENAME" | ||
- fi | ||
- echo " Python library found: $PYTHONLIBFILE" | ||
- fi | ||
- fi | ||
+ PYTHONLIBFILE=-lpython`$PYTHON -c "import sysconfig; print(sysconfig.get_config_vars('LDVERSION')[0])" 2>/dev/null` | ||
+ echo " Python library found: $PYTHONLIBFILE" | ||
fi | ||
|
||
if [ "$PYTHONINCLUDE" = "" ]; then | ||
@@ -537,8 +510,8 @@ if [ "$PYTHONINCLUDE" != "" ]; then | ||
echo "*** ERROR: wrong -pyinc path: $PYTHONINCLUDE/Python does not exist or is not a file" | ||
exit 1 | ||
fi | ||
- if [ ! -f "$PYTHONLIBFILE" ]; then | ||
- echo "*** ERROR: wrong -pylib path: $PYTHONLIBFILE does not exist or not a file" | ||
+ if [[ ! ${PYTHONLIBFILE} == -lpython3* ]]; then | ||
+ echo "*** ERROR: wrong -pylib path: $PYTHONLIBFILE does not look like a python library name" | ||
exit 1 | ||
fi | ||
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
# Use `conda-build-prepare` before building for a better version string. | ||
{% set version = '%s_%04i_%s'|format(GIT_DESCRIBE_TAG, GIT_DESCRIBE_NUMBER|int, GIT_DESCRIBE_HASH or 'gUNKNOWN') %} | ||
|
||
{% set python_version = PYTHON_VERSION | default('3.7') %} | ||
{% set py_suffix = 'py%s'|format(python_version|replace('.', '')) %} | ||
|
||
package: | ||
name: klayout | ||
version: {{ version }} | ||
|
||
source: | ||
git_url: https://github.com/KLayout/klayout.git | ||
git_rev: master | ||
patches: | ||
- force-python-dynamic-link.patch | ||
|
||
build: | ||
# number: 201803050325 | ||
number: {{ environ.get('DATE_NUM') }} | ||
# string: 20180305_0325_py37 | ||
string: {{ environ.get('DATE_STR') }}_{{ py_suffix }} | ||
script_env: | ||
- CI | ||
- CONDA_OUT | ||
- TEST_PACKAGE | ||
|
||
requirements: | ||
build: | ||
- make | ||
- {{ compiler('cxx') }} | ||
- {{ cdt('mesa-libgl-devel') }} # [linux] | ||
- {{ cdt('mesa-dri-drivers') }} # [linux] | ||
- {{ cdt('libselinux') }} # [linux] | ||
- {{ cdt('libxdamage') }} # [linux] | ||
- {{ cdt('libxxf86vm') }} # [linux] | ||
- {{ cdt('libxext') }} # [linux] | ||
- {{ cdt('libxfixes') }} # [linux] | ||
- {{ cdt('libxau') }} # [linux] | ||
- {{ cdt('libxcb') }} # [linux] | ||
- {{ cdt('expat') }} # [linux] | ||
- {{ cdt('libpng') }} # [linux] | ||
host: | ||
- python {{ python_version }} | ||
- ruby | ||
- qt | ||
- zlib | ||
run: | ||
- python {{ python_version }} | ||
- ruby | ||
- qt | ||
- zlib | ||
|
||
test: | ||
commands: | ||
- klayout -v | ||
|
||
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: | ||
- curtisma | ||
- klayoutmatthias | ||
- proppy | ||
- flaport | ||
- joamatab |