Skip to content
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
45 changes: 45 additions & 0 deletions .github/workflows/ccpp_freebsd_14_amd64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: C/C++ Nightly FreeBSD-14-amd64

on:
push:
branches:
- Nigthly
- nightly_dev
- nightly_master

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Test
uses: cross-platform-actions/[email protected]
with:
operating_system: freebsd
version: '14.2'
run: |
uname -a
echo $SHELL
pwd
ls -lah
whoami
env | sort
sudo env ASSUME_ALWAYS_YES=yes pkg install -y at-spi2-core cmake-core eigen boost-libs cairo cereal cgal curl ninja dbus expat gdk-pixbuf2 gettext-runtime gettext-tools glew glib gmp gtk3 harfbuzz hidapi Imath jpeg-turbo libbgcode libGLU libglvnd libiconv mpfr nlopt onetbb opencascade openvdb pango pkgconf png qhull tiff wx32-gtk3 xorgproto git
pkg info | sort
cd /home/runner
git clone https://github.com/fltk/nanosvg.git
cd nanosvg
git reset --hard abcd277
mkdir _build _install
cd _build
export VERBOSE=1
cmake -DCMAKE_INSTALL_PREFIX=/home/runner/nanosvg/_install ..
cmake --build .
cmake --install .
cd /home/runner/work/SuperSlicer/SuperSlicer
mkdir _build
cd _build
cmake -DNanoSVG_DIR:PATH="/home/runner/nanosvg/_install/lib/cmake/NanoSVG/" -DSLIC3R_FHS=1 -DSLIC3R_GTK=3 -DSLIC3R_APP_KEY="SuperSlicer" -DCMAKE_C_COMPILER:STRING="cc" -DCMAKE_CXX_COMPILER:STRING="c++" -DCMAKE_C_FLAGS:STRING="-O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing " -DCMAKE_C_FLAGS_DEBUG:STRING="-O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing " -DCMAKE_C_FLAGS_RELEASE:STRING="-O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -DNDEBUG" -DCMAKE_CXX_FLAGS:STRING="-O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include " -DCMAKE_CXX_FLAGS_DEBUG:STRING="-O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include " -DCMAKE_CXX_FLAGS_RELEASE:STRING="-O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -DNDEBUG" -DCMAKE_EXE_LINKER_FLAGS:STRING=" -fstack-protector-strong -L/usr/local/lib " -DCMAKE_MODULE_LINKER_FLAGS:STRING=" -fstack-protector-strong -L/usr/local/lib " -DCMAKE_SHARED_LINKER_FLAGS:STRING=" -fstack-protector-strong -L/usr/local/lib " -DCMAKE_INSTALL_PREFIX:PATH="/usr/local" -DCMAKE_AUTOGEN_PARALLEL:STRING="24" -DCMAKE_BUILD_TYPE:STRING="Release" -DTHREADS_HAVE_PTHREAD_ARG:BOOL=YES -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=YES -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DFETCHCONTENT_FULLY_DISCONNECTED:BOOL=ON -DDEP_WX_GTK3:BOOL=ON -DCMAKE_COLOR_MAKEFILE:BOOL=OFF -GNinja -DICONV_INCLUDE_DIR=/usr/local/include -DICONV_LIBRARIES=/usr/local/lib/libiconv.so -DICONV_LIBRARY=/usr/local/lib/libiconv.so -DLIBICONV_INCLUDE_DIR=/usr/local/include -DLIBICONV_LIBRARIES=/usr/local/lib/libiconv.so -DLIBICONV_LIBRARY=/usr/local/lib/libiconv.so ..
cmake --build .
echo "Build completed successfully"
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ if (APPLE)
endif ()
endif ()

if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
if (CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
find_package(PkgConfig REQUIRED)

if (CMAKE_VERSION VERSION_LESS "3.1")
Expand Down Expand Up @@ -485,7 +485,9 @@ include_directories(BEFORE SYSTEM ${EIGEN3_INCLUDE_DIR})
# no matter what.
find_package(EXPAT REQUIRED)

if (NOT CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
add_library(libexpat INTERFACE)
endif ()

if (TARGET EXPAT::EXPAT )
target_link_libraries(libexpat INTERFACE EXPAT::EXPAT)
Expand Down
4 changes: 2 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.13)
project(Slic3r-native)

add_subdirectory(build-utils)
if (NOT APPLE)
if (NOT APPLE AND NOT CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
add_subdirectory(test-utils)
endif ()
add_subdirectory(admesh)
Expand Down Expand Up @@ -54,7 +54,7 @@ if (SLIC3R_GUI)
endif()
endif()

if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
if (CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
set (wxWidgets_CONFIG_OPTIONS "--toolkit=gtk${SLIC3R_GTK}")
endif ()
if(WIN32)
Expand Down
2 changes: 2 additions & 0 deletions src/avrdude/libavrdude.h
Original file line number Diff line number Diff line change
Expand Up @@ -950,6 +950,8 @@ int read_config_builtin();
// Header file for alloca()
#if defined(WIN32NATIVE)
# include <malloc.h>
#elif defined __FreeBSD__
# include <stdlib.h>
#else
# include <alloca.h>
#endif
Expand Down
5 changes: 4 additions & 1 deletion src/hidapi/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@

if (WIN32)
set(HIDAPI_IMPL win/hid.c)
elseif (APPLE)
set(HIDAPI_IMPL mac/hid.c)
elseif (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
set(HIDAPI_IMPL freebsd/hid.c)
else ()
# Assume Linux or Unix other than Mac OS
set(HIDAPI_IMPL linux/hid.c)
Expand All @@ -16,4 +17,6 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
# Don't link the udev library, as there are two versions out there (libudev.so.0, libudev.so.1), so they are linked explicitely.
# target_link_libraries(hidapi udev)
target_link_libraries(hidapi dl)
elseif (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
target_link_libraries(hidapi usb iconv)
endif()
Loading