Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add librecad #28941

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions recipes/librecad/build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
cmake -G "Ninja" -B "build" ^
-D CMAKE_BUILD_TYPE:STRING='Release' ^
-D CMAKE_INSTALL_PREFIX:FILEPATH=%LIBRARY_PREFIX% ^
-D QT_HOST_PATH=%LIBRARY_PREFIX%

ninja -C build install
8 changes: 8 additions & 0 deletions recipes/librecad/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
CXXFLAGS="${CXXFLAGS} -D_LIBCPP_DISABLE_AVAILABILITY"

cmake -G "Ninja" -B "build" \
-D CMAKE_BUILD_TYPE:STRING='Release' \
-D CMAKE_INSTALL_PREFIX:FILEPATH=${PREFIX} \
-D QT_HOST_PATH:FILEPATH=${PREFIX}

ninja -C build install
2 changes: 2 additions & 0 deletions recipes/librecad/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
MACOSX_SDK_VERSION: # [osx]
- '11.0' # [osx]
56 changes: 56 additions & 0 deletions recipes/librecad/recipe.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
context:
name: librecad
version: "2.2.1"

package:
name: ${{ name|lower }}
version: ${{ version }}

source:
url: https://github.com/LibreCAD/LibreCAD/archive/a63aeebf83bbe34810326b7d06a0baca779f81de.tar.gz
sha256: 38b704e1c7b3916c7d50c3e81af28b33777d9eea7e2524a184f528d74f8ae6e1

build:
number: 0

requirements:
build:
- ${{ compiler('cxx') }}
- ${{ stdlib('c') }}
- cmake
- ninja
host:
- if: linux
then:
- libgl-devel
- qt6-main
- libboost-devel
- freetype

tests:
# check if librecad was built and installed
- script:
python test_application_exist.py
requirements:
run:
- python
files:
recipe:
- test_application_exist.py


about:
homepage: https://librecad.org/
summary: 'LibreCAD is a free Open Source CAD application for Windows, Apple and Linux. Support and documentation are free from our large, dedicated community of users, contributors and developers.'
description: |
LibreCAD is a 2D CAD drawing tool based on the community
edition of QCAD. LibreCAD uses the cross-platform framework
Qt, which means it works with most operating systems.
license: GPL-2.0-or-later
license_file: LICENSE
documentation: https://docs.librecad.org/en/latest/
repository: https://github.com/LibreCAD/LibreCAD

extra:
recipe-maintainers:
- looooo
7 changes: 7 additions & 0 deletions recipes/librecad/test_application_exist.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import shutil

app_name = "librecad"
if shutil.which(app_name):
print(f"{app_name} is installed.")
else:
raise FileNotFoundError(f"{app_name} is NOT installed.")
Loading