Skip to content

Commit

Permalink
build: add NetBSD support to depends
Browse files Browse the repository at this point in the history
  • Loading branch information
fanquake committed Feb 14, 2022
1 parent 3ce40e6 commit 7b06ffc
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 0 deletions.
2 changes: 2 additions & 0 deletions depends/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ full_build_os:=$(subst $(build_arch)-$(build_vendor)-,,$(build))
build_os:=$(findstring linux,$(full_build_os))
build_os+=$(findstring darwin,$(full_build_os))
build_os+=$(findstring freebsd,$(full_build_os))
build_os+=$(findstring netbsd,$(full_build_os))
build_os+=$(findstring openbsd,$(full_build_os))
build_os:=$(strip $(build_os))
ifeq ($(build_os),)
Expand All @@ -89,6 +90,7 @@ full_host_os:=$(subst $(host_arch)-$(host_vendor)-,,$(canonical_host))
host_os:=$(findstring linux,$(full_host_os))
host_os+=$(findstring darwin,$(full_host_os))
host_os+=$(findstring freebsd,$(full_host_os))
host_os+=$(findstring netbsd,$(full_host_os))
host_os+=$(findstring openbsd,$(full_host_os))
host_os+=$(findstring mingw32,$(full_host_os))

Expand Down
2 changes: 2 additions & 0 deletions depends/builders/netbsd.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
build_netbsd_SHA256SUM = shasum -a 256
build_netbsd_DOWNLOAD = curl --location --fail --connect-timeout $(DOWNLOAD_CONNECT_TIMEOUT) --retry $(DOWNLOAD_RETRIES) -o
31 changes: 31 additions & 0 deletions depends/hosts/netbsd.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
netbsd_CFLAGS=-pipe
netbsd_CXXFLAGS=$(netbsd_CFLAGS)

netbsd_release_CFLAGS=-O2
netbsd_release_CXXFLAGS=$(netbsd_release_CFLAGS)

netbsd_debug_CFLAGS=-O1
netbsd_debug_CXXFLAGS=$(netbsd_debug_CFLAGS)

ifeq (86,$(findstring 86,$(build_arch)))
i686_netbsd_CC=gcc -m32
i686_netbsd_CXX=g++ -m32
i686_netbsd_AR=ar
i686_netbsd_RANLIB=ranlib
i686_netbsd_NM=nm
i686_netbsd_STRIP=strip

x86_64_netbsd_CC=gcc -m64
x86_64_netbsd_CXX=g++ -m64
x86_64_netbsd_AR=ar
x86_64_netbsd_RANLIB=ranlib
x86_64_netbsd_NM=nm
x86_64_netbsd_STRIP=strip
else
i686_netbsd_CC=$(default_host_CC) -m32
i686_netbsd_CXX=$(default_host_CXX) -m32
x86_64_netbsd_CC=$(default_host_CC) -m64
x86_64_netbsd_CXX=$(default_host_CXX) -m64
endif

netbsd_cmake_system=NetBSD
1 change: 1 addition & 0 deletions depends/packages/bdb.mk
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ $(package)_config_opts=--disable-shared --enable-cxx --disable-replication --ena
$(package)_config_opts_mingw32=--enable-mingw
$(package)_config_opts_linux=--with-pic
$(package)_config_opts_freebsd=--with-pic
$(package)_config_opts_netbsd=--with-pic
$(package)_config_opts_openbsd=--with-pic
$(package)_config_opts_android=--with-pic
$(package)_cflags+=-Wno-error=implicit-function-declaration
Expand Down
1 change: 1 addition & 0 deletions depends/packages/libevent.mk
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ define $(package)_set_vars
$(package)_config_opts_release=--disable-debug-mode
$(package)_config_opts_linux=--with-pic
$(package)_config_opts_freebsd=--with-pic
$(package)_config_opts_netbsd=--with-pic
$(package)_config_opts_openbsd=--with-pic
$(package)_config_opts_android=--with-pic
$(package)_cppflags_mingw32=-D_WIN32_WINNT=0x0601
Expand Down
1 change: 1 addition & 0 deletions depends/packages/sqlite.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ define $(package)_set_vars
$(package)_config_opts=--disable-shared --disable-readline --disable-dynamic-extensions --enable-option-checking
$(package)_config_opts_linux=--with-pic
$(package)_config_opts_freebsd=--with-pic
$(package)_config_opts_netbsd=--with-pic
$(package)_config_opts_openbsd=--with-pic
endef

Expand Down
1 change: 1 addition & 0 deletions depends/packages/zeromq.mk
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ define $(package)_set_vars
$(package)_config_opts += --disable-Werror --disable-drafts --enable-option-checking
$(package)_config_opts_linux=--with-pic
$(package)_config_opts_freebsd=--with-pic
$(package)_config_opts_netbsd=--with-pic
$(package)_config_opts_openbsd=--with-pic
$(package)_config_opts_android=--with-pic
$(package)_cxxflags+=-std=c++17
Expand Down

0 comments on commit 7b06ffc

Please sign in to comment.