File tree Expand file tree Collapse file tree 4 files changed +49
-4
lines changed Expand file tree Collapse file tree 4 files changed +49
-4
lines changed Original file line number Diff line number Diff line change 6363 if-no-files-found : ' error'
6464 retention-days : 1
6565 compression-level : 0
66+
67+ freebsd_builds :
68+ runs-on : ubuntu-latest
69+ strategy :
70+ matrix :
71+ freebsd_arch : [aarch64, amd64]
72+ steps :
73+ - uses : actions/checkout@v4
74+
75+ - name : Build freebsd-${{ matrix.freebsd_arch }} Prebuild
76+ uses : vmactions/freebsd-vm@v1
77+ with :
78+ arch : ${{ matrix.freebsd_arch }}
79+ usesh : true
80+ prepare : |
81+ pkg install -y krb5 node npm pkgconf
82+ run : |
83+ node .github/scripts/build.mjs
84+
85+ - id : upload
86+ name : Upload prebuild
87+ uses : actions/upload-artifact@v4
88+ with :
89+ name : build-freebsd-${{ matrix.freebsd_arch }}
90+ path : prebuilds/
91+ if-no-files-found : ' error'
92+ retention-days : 1
93+ compression-level : 0
Original file line number Diff line number Diff line change 5454 ]
5555 }
5656 }],
57- ['OS=="mac" or OS=="linux"' , {
57+ ['OS=="mac" or OS=="linux" or OS=="freebsd" ' , {
5858 'sources' : [
5959 'src/unix/base64.cc' ,
6060 'src/unix/kerberos_gss.cc' ,
6161 'src/unix/kerberos_unix.cc'
6262 ]
6363 }],
64- ['(OS=="mac") or (OS=="linux" and kerberos_use_rtld!="true")' , {
64+ ['(OS=="mac") or (( OS=="linux" or OS=="freebsd") and kerberos_use_rtld!="true")' , {
6565 'link_settings' : {
6666 'libraries' : [
6767 '-lkrb5' ,
7878 }]
7979 ]
8080 }],
81- ['(OS=="linux") and (kerberos_use_rtld=="true")' , {
81+ ['(OS=="linux" or OS=="freebsd" ) and (kerberos_use_rtld=="true")' , {
8282 'defines' : ['KERBEROS_USE_RTLD=1' ],
8383 'link_settings' : {
8484 'libraries' : [
8585 '-ldl' ,
8686 ]
8787 },
8888 }],
89+ ['OS=="freebsd"' , {
90+ 'include_dirs+' : [
91+ '<!(pkg-config krb5 --cflags-only-I | sed -E "s/(-I *|-isystem *)//g")' ,
92+ ],
93+ 'link_settings' : {
94+ 'library_dirs' : [
95+ '<!(pkg-config krb5 --libs-only-L | sed -e "s/-L//g")' ,
96+ ]
97+ },
98+ }],
8999 ['OS=="win"' , {
90100 'sources' : [
91101 'src/win32/kerberos_sspi.cc' ,
Original file line number Diff line number Diff line change 11#ifndef KERBEROS_COMMON_H
22#define KERBEROS_COMMON_H
33
4- #if defined(__linux__) || defined(__APPLE__)
4+ #if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__)
55#include " unix/kerberos_gss.h"
66
77namespace node_kerberos {
Original file line number Diff line number Diff line change @@ -65,10 +65,17 @@ struct DLOpenHandle {
6565 DLOpenHandle& operator =(DLOpenHandle&) = delete ;
6666};
6767
68+ #ifndef __FreeBSD__
6869#define DYLIBS (V ) \
6970 V (gssapi, " libgssapi_krb5.so.2" ) \
7071 V(krb5, " libkrb5.so.3" ) \
7172 V(comerr, " libcom_err.so.2" )
73+ #else
74+ #define DYLIBS (V ) \
75+ V (gssapi, " libgssapi_krb5.so.2" ) \
76+ V(krb5, " libkrb5.so.3" ) \
77+ V(comerr, " libcom_err.so.3" )
78+ #endif
7279
7380#define LIBRARY_HANDLE_GETTER (name, lib ) \
7481 static const DLOpenHandle& name ## _handle() { \
You can’t perform that action at this time.
0 commit comments